package com.bean.base;

import com.bean.anno.TableExcel;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.time.LocalDateTime;
import java.util.Date;

@Data
@Entity
@Table(name = "user_info")
@TableExcel(name="userInfo", content = "EasyExcel用户信息",jpaBeanName="com.mapper.repository.UserInfoRepository")
public class UserInfo {

    @Id
    private String id;

    private String username;

    private String password;

    private String remark;

    private String introduction;

    private String avatar;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createtime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatetime;

    @Transient
    @JsonProperty("userid")
    private String creator;

}
